<?php
include("cfg.php");

// Start library
require_once LIB.'Library.php';
$library = new Library();

if(DEVELOPMENT) {
	// Start timer
	$timer = new Timer();
	$timer->start();
}

// Run!
require_once APP . 'Bootstrap.php';
$frontController = new Bootstrap();
echo $frontController->run();

define("MEM_END",memory_get_usage(true));

if(DEVELOPMENT) {
	// Stop timer
	$time = $timer->stop();
//	echo PHP_EOL . PHP_EOL . '<!--' . $time . '-->';

	// Log times
	$parseLog = new Log(new Mvc_Request(), APP . 'logs/parse.txt');
	$parseLog->write($time."\t".memory_get_peak_usage());
}
